<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<style>
			html,
			body,
			header,
			section,
			footer,
			nav,
			div,
			ul,
			ol,
			li,
			img,
			a,
			span,
			em,
			del,
			center,
			strong,
			var,
			fieldset,
			form,
			label,
			dt,
			dd,
			cite,
			input,
			hr,
			time,
			mark,
			code,
			figcaption,
			figure,
			textarea {
				margin: 0;
				border: 0;
				padding: 0;
				font-family: Tahoma, Geneva, sans-serif;
				font-style: normal;
			}
			
			html,
			body {
				-webkit-touch-callout: none;
				-webkit-text-size-adjust: none;
				-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
				-webkit-user-select: none;
				background-color: #FFFFFF;
			}
			
			header,
			footer,
			section,
			nav,
			img,
			a,
			button,
			em,
			del,
			strong,
			var,
			fieldset,
			label,
			cite,
			small,
			time,
			mark,
			code,
			figcaption,
			figure,
			textarea {
				display: block;
			}
			
			header,
			section,
			footer,
			nav {
				position: relative;
				overflow: hidden;
			}
			
			ol,
			ul {
				list-style: none;
			}
			
			input,
			button,
			textarea {
				border: 0;
				margin: 0;
				padding: 0;
				font-size: 1em;
				line-height: 1em;
				-webkit-appearance: none;
				background-color: rgba(0, 0, 0, 0);
			}
			
			span {
				display: inline-block;
			}
			
			a,
			a:visited {
				text-decoration: none;
			}
		</style>
	</head>

	<body>
		<br>
		<br>
		<br>
		<br>
		<button tapmode="ui-hov" onclick="opensl()">
			<span></span>
		</button>
		<br>
		<br>
		<br>
	</body>
	<script>
		window.apiready = function() {
//			api.openSlidLayout({
//				leftEdge: api.winWidth / 3,
//				type: 'left',
//				fixedPane: {
//					name: 'homeFixed',
//					url: 'html/index-menu.html'
//				},
//				slidPane: {
//					name: 'homeSlid',
//					url: 'html/tabbar.html'
//				}
//			}, function(ret) {
//				if (ret.event == 'slide') {
//					api.sendEvent({
//						name: 'SlidLayout'
//					});
//				} else if (ret.event == 'close') {
//					api.sendEvent({
//						name: 'SlidClose'
//					});
//				}
//			});
			
			api.openDrawerLayout({
			    name: 'main',
			    url: 'html/tabbar.html',
			    animation:{
			        type:'none'
			    },
			    leftPane:{
			        name: 'leftPane',
			        edge:'100',
			        url: 'html/index-menu.html'
			    }
			});
			
//			api.addEventListener({
//				name: 'keyback'
//			}, function(ret, err) {
//				api.closeWidget();
//			});
			var push = api.require('push');
//			push.joinGroup({
//				groupName: 'test2'
//			}, function(ret, err) {
//				if (ret.status) {
//					api.toast({
//						msg: '加入组成功'
//					});
//				} else {
//					api.toast({
//						msg: "失败"
//					});
//				}
//			});
			push.setListener(
				function(ret, err) {
					if (ret) {
						var data = ret.data;
						api.openWin({
							name: 'push',
							url: 'html/push.html',
							pageParam: {
								url: data
							}
						});
					}
				}
			);
		};
	</script>

</html>